package javabase.schoolwork.day6_12;

import java.util.ArrayList;
import java.util.List;

/**
 * @author fance
 * @date 18-6-13 下午12:34
 */
public class TestMore {
    public static void main(String[] args) {
        Course course1 = new Course("1",1);
        Course course2 = new Course("2",2);
        Course course3 = new Course("3",3);
        List<Student> studentList = new ArrayList<>();
        List<Course> courseList = new ArrayList<>();
        courseList.add(course1);
        courseList.add(course2);
        courseList.add(course3);
        for (int i = 0; i < 3; i++) {
            studentList.add(new Student(String.valueOf(i  * 10),i * 10));
        }

      /*  for (int i = 0; i < 3; i++) {
            courseList.get(i).getStudentList().add(studentList.get(i));
            studentList.get(i).getCourseList().add(courseList.get(i));
        }

        for (Course course : courseList) {
            for (Student student : course.getStudentList()) {
                System.out.println(student);
            }
        }*/
        for (Student student : studentList) {
            for (Course course : student.getCourseList()) {
                System.out.println(course);
            }
        }
    }
}
